package com.caochenlei.factory;

public class ShapeFactory {
    public static Shape createShape(String shapeType) {
        if ("Rectangle".equalsIgnoreCase(shapeType)) {
            return new Rectangle();
        }
        if ("Square".equalsIgnoreCase(shapeType)) {
            return new Square();
        }
        if ("Circle".equalsIgnoreCase(shapeType)) {
            return new Circle();
        }
        return null;
    }
}
